package com.xjscrm.console.web.captcha;

import com.xjscrm.console.biz.CaptchaService;
import com.xjscrm.console.param.captcha.CaptchaDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "滑块验证码", tags = "滑块验证码")
@RestController
@RequestMapping("/captcha")
public class CaptchaController {

    @Autowired
    private CaptchaService captchaService;

    @ApiOperation(value = "生成验证码拼图")
    @PostMapping("/getCaptcha")
    public Object getCaptcha(@RequestBody CaptchaDto captchaDto){
        return captchaService.getCaptcha(captchaDto);
    }
}
